<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- (c) The University of Glasgow 2006</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998</span><span>
</span><span id="line-3"></span><span class="hs-comment">--</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Storage manager representation of closures</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP,GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Runtime.Heap.Layout</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Words and bytes</span></span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier">WordOff</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier">ByteOff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier">wordsToBytes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#bytesToWordsRoundUp"><span class="hs-identifier">bytesToWordsRoundUp</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#roundUpToWords"><span class="hs-identifier">roundUpToWords</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#roundUpTo"><span class="hs-identifier">roundUpTo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier">StgWord</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fromStgWord"><span class="hs-identifier">fromStgWord</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#toStgWord"><span class="hs-identifier">toStgWord</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier">StgHalfWord</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fromStgHalfWord"><span class="hs-identifier">fromStgHalfWord</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#toStgHalfWord"><span class="hs-identifier">toStgHalfWord</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#halfWordSize"><span class="hs-identifier">halfWordSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#halfWordSizeInBits"><span class="hs-identifier">halfWordSizeInBits</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Closure representation</span></span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier">SMRep</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- CmmInfo sees the rep; no one else does</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IsStatic"><span class="hs-identifier">IsStatic</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier">ClosureTypeInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ArgDescr"><span class="hs-identifier">ArgDescr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#Liveness"><span class="hs-identifier">Liveness</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ConstrDescription"><span class="hs-identifier">ConstrDescription</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Construction</span></span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkHeapRep"><span class="hs-identifier">mkHeapRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#blackHoleRep"><span class="hs-identifier">blackHoleRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#indStaticRep"><span class="hs-identifier">indStaticRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkStackRep"><span class="hs-identifier">mkStackRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkRTSRep"><span class="hs-identifier">mkRTSRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsRep"><span class="hs-identifier">arrPtrsRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsRep"><span class="hs-identifier">smallArrPtrsRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsRep"><span class="hs-identifier">arrWordsRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Predicates</span></span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier">isStaticRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier">isConRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier">isThunkRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isFunRep"><span class="hs-identifier">isFunRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticNoCafCon"><span class="hs-identifier">isStaticNoCafCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier">isStackRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Size-related things</span></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier">heapClosureSizeW</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier">fixedHdrSizeW</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSize"><span class="hs-identifier">arrWordsHdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSizeW"><span class="hs-identifier">arrWordsHdrSizeW</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSize"><span class="hs-identifier">arrPtrsHdrSize</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSizeW"><span class="hs-identifier">arrPtrsHdrSizeW</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#profHdrSize"><span class="hs-identifier">profHdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier">thunkHdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSize"><span class="hs-identifier">nonHdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier">nonHdrSizeW</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSize"><span class="hs-identifier">smallArrPtrsHdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSizeW"><span class="hs-identifier">smallArrPtrsHdrSizeW</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSize"><span class="hs-identifier">hdrSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier">hdrSizeW</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier">fixedHdrSize</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** RTS closure types</span></span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rtsClosureType"><span class="hs-identifier">rtsClosureType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rET_SMALL"><span class="hs-identifier">rET_SMALL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rET_BIG"><span class="hs-identifier">rET_BIG</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN"><span class="hs-identifier">aRG_GEN</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN_BIG"><span class="hs-identifier">aRG_GEN_BIG</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Arrays</span></span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#card"><span class="hs-identifier">card</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardRoundUp"><span class="hs-identifier">cardRoundUp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeB"><span class="hs-identifier">cardTableSizeB</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeW"><span class="hs-identifier">cardTableSizeW</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTagZ"><span class="hs-identifier">ConTagZ</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html"><span class="hs-identifier">GHC.StgToCmm.Types</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                Words and bytes
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Byte offset, or byte count</span><span>
</span><span id="line-69"></span><span class="hs-keyword">type</span><span> </span><span id="ByteOff"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-var">ByteOff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- | Round up the given byte count to the next byte count that's a</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- multiple of the machine's word size.</span><span>
</span><span id="line-73"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#roundUpToWords"><span class="hs-identifier hs-type">roundUpToWords</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-74"></span><span id="roundUpToWords"><span class="annot"><span class="annottext">roundUpToWords :: Platform -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#roundUpToWords"><span class="hs-identifier hs-var hs-var">roundUpToWords</span></a></span></span><span> </span><span id="local-6989586621680934304"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934304"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934303"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934303"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#roundUpTo"><span class="hs-identifier hs-var">roundUpTo</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934303"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934304"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-comment">-- | Round up @base@ to a multiple of @size@.</span><span>
</span><span id="line-77"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#roundUpTo"><span class="hs-identifier hs-type">roundUpTo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-78"></span><span id="roundUpTo"><span class="annot"><span class="annottext">roundUpTo :: ConTagZ -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#roundUpTo"><span class="hs-identifier hs-var hs-var">roundUpTo</span></a></span></span><span> </span><span id="local-6989586621680934301"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934301"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621680934300"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934300"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934301"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934300"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ
forall a. Bits a =&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#complement"><span class="hs-identifier hs-var">complement</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934300"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- | Convert the given number of words to a number of bytes.</span><span>
</span><span id="line-81"></span><span class="hs-comment">--</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- This function morally has type @WordOff -&gt; ByteOff@, but uses @Num</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- a@ to allow for overloading.</span><span>
</span><span id="line-84"></span><span id="local-6989586621680934526"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier hs-type">wordsToBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680934526"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934526"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680934526"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-85"></span><span id="wordsToBytes"><span class="annot"><span class="annottext">wordsToBytes :: forall a. Num a =&gt; Platform -&gt; a -&gt; a
</span><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier hs-var hs-var">wordsToBytes</span></a></span></span><span> </span><span id="local-6989586621680934292"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934292"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934291"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934291"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; a
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934292"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680934291"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-86"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-pragma hs-type">wordsToBytes</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-pragma hs-type">Platform</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Int</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Int</span></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-87"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-pragma hs-type">wordsToBytes</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-pragma hs-type">Platform</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Word</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Word</span></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-88"></span><span class="hs-pragma">{-# SPECIALIZE</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-pragma hs-type">wordsToBytes</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-pragma hs-type">Platform</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Integer</span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><span class="hs-pragma hs-type">Integer</span></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | First round the given byte count up to a multiple of the</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- machine's word size and then convert the result to words.</span><span>
</span><span id="line-92"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#bytesToWordsRoundUp"><span class="hs-identifier hs-type">bytesToWordsRoundUp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-93"></span><span id="bytesToWordsRoundUp"><span class="annot"><span class="annottext">bytesToWordsRoundUp :: Platform -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#bytesToWordsRoundUp"><span class="hs-identifier hs-var hs-var">bytesToWordsRoundUp</span></a></span></span><span> </span><span id="local-6989586621680934289"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934289"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934288"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934288"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934288"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934287"><span class="hs-identifier hs-var">word_size</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934287"><span class="hs-identifier hs-var">word_size</span></a></span><span>
</span><span id="line-94"></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680934287"><span class="annot"><span class="annottext">word_size :: ConTagZ
</span><a href="#local-6989586621680934287"><span class="hs-identifier hs-var hs-var">word_size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934289"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- StgWord is a type representing an StgWord on the target platform.</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- A Word64 is large enough to hold a Word for either a 32bit or 64bit platform</span><span>
</span><span id="line-97"></span><span class="hs-keyword">newtype</span><span> </span><span id="StgWord"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-var">StgWord</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="StgWord"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-var">StgWord</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680934278"><span id="local-6989586621680934283"><span class="annot"><span class="annottext">StgWord -&gt; StgWord -&gt; Bool
(StgWord -&gt; StgWord -&gt; Bool)
-&gt; (StgWord -&gt; StgWord -&gt; Bool) -&gt; Eq StgWord
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: StgWord -&gt; StgWord -&gt; Bool
$c/= :: StgWord -&gt; StgWord -&gt; Bool
== :: StgWord -&gt; StgWord -&gt; Bool
$c== :: StgWord -&gt; StgWord -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680934185"><span id="local-6989586621680934189"><span id="local-6989586621680934193"><span id="local-6989586621680934197"><span id="local-6989586621680934201"><span id="local-6989586621680934205"><span id="local-6989586621680934209"><span id="local-6989586621680934213"><span id="local-6989586621680934217"><span id="local-6989586621680934221"><span id="local-6989586621680934225"><span id="local-6989586621680934229"><span id="local-6989586621680934233"><span id="local-6989586621680934237"><span id="local-6989586621680934241"><span id="local-6989586621680934245"><span id="local-6989586621680934249"><span id="local-6989586621680934253"><span id="local-6989586621680934257"><span id="local-6989586621680934261"><span id="local-6989586621680934265"><span id="local-6989586621680934270"><span class="annot"><span class="annottext">Eq StgWord
StgWord
Eq StgWord
-&gt; (StgWord -&gt; StgWord -&gt; StgWord)
-&gt; (StgWord -&gt; StgWord -&gt; StgWord)
-&gt; (StgWord -&gt; StgWord -&gt; StgWord)
-&gt; (StgWord -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; StgWord
-&gt; (ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; Bool)
-&gt; (StgWord -&gt; Maybe ConTagZ)
-&gt; (StgWord -&gt; ConTagZ)
-&gt; (StgWord -&gt; Bool)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ -&gt; StgWord)
-&gt; (StgWord -&gt; ConTagZ)
-&gt; Bits StgWord
ConTagZ -&gt; StgWord
StgWord -&gt; Bool
StgWord -&gt; ConTagZ
StgWord -&gt; Maybe ConTagZ
StgWord -&gt; StgWord
StgWord -&gt; ConTagZ -&gt; Bool
StgWord -&gt; ConTagZ -&gt; StgWord
StgWord -&gt; StgWord -&gt; StgWord
forall a.
Eq a
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; a
-&gt; (ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; Bool)
-&gt; (a -&gt; Maybe ConTagZ)
-&gt; (a -&gt; ConTagZ)
-&gt; (a -&gt; Bool)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ -&gt; a)
-&gt; (a -&gt; ConTagZ)
-&gt; Bits a
popCount :: StgWord -&gt; ConTagZ
$cpopCount :: StgWord -&gt; ConTagZ
rotateR :: StgWord -&gt; ConTagZ -&gt; StgWord
$crotateR :: StgWord -&gt; ConTagZ -&gt; StgWord
rotateL :: StgWord -&gt; ConTagZ -&gt; StgWord
$crotateL :: StgWord -&gt; ConTagZ -&gt; StgWord
unsafeShiftR :: StgWord -&gt; ConTagZ -&gt; StgWord
$cunsafeShiftR :: StgWord -&gt; ConTagZ -&gt; StgWord
shiftR :: StgWord -&gt; ConTagZ -&gt; StgWord
$cshiftR :: StgWord -&gt; ConTagZ -&gt; StgWord
unsafeShiftL :: StgWord -&gt; ConTagZ -&gt; StgWord
$cunsafeShiftL :: StgWord -&gt; ConTagZ -&gt; StgWord
shiftL :: StgWord -&gt; ConTagZ -&gt; StgWord
$cshiftL :: StgWord -&gt; ConTagZ -&gt; StgWord
isSigned :: StgWord -&gt; Bool
$cisSigned :: StgWord -&gt; Bool
bitSize :: StgWord -&gt; ConTagZ
$cbitSize :: StgWord -&gt; ConTagZ
bitSizeMaybe :: StgWord -&gt; Maybe ConTagZ
$cbitSizeMaybe :: StgWord -&gt; Maybe ConTagZ
testBit :: StgWord -&gt; ConTagZ -&gt; Bool
$ctestBit :: StgWord -&gt; ConTagZ -&gt; Bool
complementBit :: StgWord -&gt; ConTagZ -&gt; StgWord
$ccomplementBit :: StgWord -&gt; ConTagZ -&gt; StgWord
clearBit :: StgWord -&gt; ConTagZ -&gt; StgWord
$cclearBit :: StgWord -&gt; ConTagZ -&gt; StgWord
setBit :: StgWord -&gt; ConTagZ -&gt; StgWord
$csetBit :: StgWord -&gt; ConTagZ -&gt; StgWord
bit :: ConTagZ -&gt; StgWord
$cbit :: ConTagZ -&gt; StgWord
zeroBits :: StgWord
$czeroBits :: StgWord
rotate :: StgWord -&gt; ConTagZ -&gt; StgWord
$crotate :: StgWord -&gt; ConTagZ -&gt; StgWord
shift :: StgWord -&gt; ConTagZ -&gt; StgWord
$cshift :: StgWord -&gt; ConTagZ -&gt; StgWord
complement :: StgWord -&gt; StgWord
$ccomplement :: StgWord -&gt; StgWord
xor :: StgWord -&gt; StgWord -&gt; StgWord
$cxor :: StgWord -&gt; StgWord -&gt; StgWord
.|. :: StgWord -&gt; StgWord -&gt; StgWord
$c.|. :: StgWord -&gt; StgWord -&gt; StgWord
.&amp;. :: StgWord -&gt; StgWord -&gt; StgWord
$c.&amp;. :: StgWord -&gt; StgWord -&gt; StgWord
</span><a href="../../base/src/Data.Bits.html#C%3ABits"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Bits</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fromStgWord"><span class="hs-identifier hs-type">fromStgWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-type">StgWord</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>
</span><span id="line-101"></span><span id="fromStgWord"><span class="annot"><span class="annottext">fromStgWord :: StgWord -&gt; Integer
</span><a href="GHC.Runtime.Heap.Layout.html#fromStgWord"><span class="hs-identifier hs-var hs-var">fromStgWord</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-type">StgWord</span></a></span><span> </span><span id="local-6989586621680934180"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621680934180"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621680934180"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#toStgWord"><span class="hs-identifier hs-type">toStgWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-type">StgWord</span></a></span><span>
</span><span id="line-104"></span><span id="toStgWord"><span class="annot"><span class="annottext">toStgWord :: Platform -&gt; Integer -&gt; StgWord
</span><a href="GHC.Runtime.Heap.Layout.html#toStgWord"><span class="hs-identifier hs-var hs-var">toStgWord</span></a></span></span><span> </span><span id="local-6989586621680934179"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934179"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934178"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934178"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSize"><span class="hs-identifier hs-var hs-var">platformWordSize</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934179"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-106"></span><span>      </span><span class="hs-comment">-- These conversions mean that things like toStgWord (-1)</span><span>
</span><span id="line-107"></span><span>      </span><span class="hs-comment">-- do the right thing</span><span>
</span><span id="line-108"></span><span>      </span><span class="annot"><span class="annottext">PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#PW4"><span class="hs-identifier hs-var">PW4</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; StgWord
</span><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-var">StgWord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word32
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934178"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>      </span><span class="annot"><span class="annottext">PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#PW8"><span class="hs-identifier hs-var">PW8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; StgWord
</span><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-var">StgWord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word64
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934178"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934172"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-type">StgWord</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-112"></span><span>    </span><span id="local-6989586621680934169"><span class="annot"><span class="annottext">ppr :: StgWord -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgWord"><span class="hs-identifier hs-type">StgWord</span></a></span><span> </span><span id="local-6989586621680934167"><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621680934167"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#integer"><span class="hs-identifier hs-var">integer</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word64 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Word64
</span><a href="#local-6989586621680934167"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-comment">--</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-- A Word32 is large enough to hold half a Word for either a 32bit or</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- 64bit platform</span><span>
</span><span id="line-118"></span><span class="hs-keyword">newtype</span><span> </span><span id="StgHalfWord"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-var">StgHalfWord</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="StgHalfWord"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-var">StgHalfWord</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680934158"><span id="local-6989586621680934163"><span class="annot"><span class="annottext">StgHalfWord -&gt; StgHalfWord -&gt; Bool
(StgHalfWord -&gt; StgHalfWord -&gt; Bool)
-&gt; (StgHalfWord -&gt; StgHalfWord -&gt; Bool) -&gt; Eq StgHalfWord
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: StgHalfWord -&gt; StgHalfWord -&gt; Bool
$c/= :: StgHalfWord -&gt; StgHalfWord -&gt; Bool
== :: StgHalfWord -&gt; StgHalfWord -&gt; Bool
$c== :: StgHalfWord -&gt; StgHalfWord -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fromStgHalfWord"><span class="hs-identifier hs-type">fromStgHalfWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-type">StgHalfWord</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>
</span><span id="line-122"></span><span id="fromStgHalfWord"><span class="annot"><span class="annottext">fromStgHalfWord :: StgHalfWord -&gt; Integer
</span><a href="GHC.Runtime.Heap.Layout.html#fromStgHalfWord"><span class="hs-identifier hs-var hs-var">fromStgHalfWord</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-type">StgHalfWord</span></a></span><span> </span><span id="local-6989586621680934154"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621680934154"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621680934154"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#toStgHalfWord"><span class="hs-identifier hs-type">toStgHalfWord</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-type">StgHalfWord</span></a></span><span>
</span><span id="line-125"></span><span id="toStgHalfWord"><span class="annot"><span class="annottext">toStgHalfWord :: Platform -&gt; Integer -&gt; StgHalfWord
</span><a href="GHC.Runtime.Heap.Layout.html#toStgHalfWord"><span class="hs-identifier hs-var hs-var">toStgHalfWord</span></a></span></span><span> </span><span id="local-6989586621680934153"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934153"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934152"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934152"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-126"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSize"><span class="hs-identifier hs-var hs-var">platformWordSize</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934153"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-127"></span><span>      </span><span class="hs-comment">-- These conversions mean that things like toStgHalfWord (-1)</span><span>
</span><span id="line-128"></span><span>      </span><span class="hs-comment">-- do the right thing</span><span>
</span><span id="line-129"></span><span>      </span><span class="annot"><span class="annottext">PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#PW4"><span class="hs-identifier hs-var">PW4</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; StgHalfWord
</span><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-var">StgHalfWord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word16
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934152"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span>      </span><span class="annot"><span class="annottext">PlatformWordSize
</span><a href="../../ghc-boot/src/GHC.Platform.html#PW8"><span class="hs-identifier hs-var">PW8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; StgHalfWord
</span><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-var">StgHalfWord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Word32
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680934152"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934149"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-type">StgHalfWord</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-133"></span><span>    </span><span id="local-6989586621680934147"><span class="annot"><span class="annottext">ppr :: StgHalfWord -&gt; SDoc
</span><a href="#local-6989586621680934147"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StgHalfWord"><span class="hs-identifier hs-type">StgHalfWord</span></a></span><span> </span><span id="local-6989586621680934146"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621680934146"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#integer"><span class="hs-identifier hs-var">integer</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621680934146"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-comment">-- | Half word size in bytes</span><span>
</span><span id="line-136"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#halfWordSize"><span class="hs-identifier hs-type">halfWordSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-137"></span><span id="halfWordSize"><span class="annot"><span class="annottext">halfWordSize :: Platform -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#halfWordSize"><span class="hs-identifier hs-var hs-var">halfWordSize</span></a></span></span><span> </span><span id="local-6989586621680934145"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934145"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934145"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#div"><span class="hs-operator hs-var">`div`</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#halfWordSizeInBits"><span class="hs-identifier hs-type">halfWordSizeInBits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-140"></span><span id="halfWordSizeInBits"><span class="annot"><span class="annottext">halfWordSizeInBits :: Platform -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#halfWordSizeInBits"><span class="hs-identifier hs-var hs-var">halfWordSizeInBits</span></a></span></span><span> </span><span id="local-6989586621680934143"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934143"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBits"><span class="hs-identifier hs-var">platformWordSizeInBits</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934143"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#div"><span class="hs-operator hs-var">`div`</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsubsection[SMRep-datatype]{@SMRep@---storage manager representation}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">-- | A description of the layout of a closure.  Corresponds directly</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- to the closure types in includes\/rts\/storage\/ClosureTypes.h.</span><span>
</span><span id="line-152"></span><span class="hs-keyword">data</span><span> </span><span id="SMRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-var">SMRep</span></a></span></span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="HeapRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-var">HeapRep</span></a></span></span><span>              </span><span class="hs-comment">-- GC routines consult sizes in info tbl</span><span>
</span><span id="line-154"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IsStatic"><span class="hs-identifier hs-type">IsStatic</span></a></span><span>
</span><span id="line-155"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>         </span><span class="hs-comment">--  # ptr words</span><span>
</span><span id="line-156"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>         </span><span class="hs-comment">--  # non-ptr words INCLUDING SLOP (see mkHeapRep below)</span><span>
</span><span id="line-157"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span>  </span><span class="hs-comment">-- type-specific info</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ArrayPtrsRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-var">ArrayPtrsRep</span></a></span></span><span>
</span><span id="line-160"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>        </span><span class="hs-comment">-- # ptr words</span><span>
</span><span id="line-161"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>        </span><span class="hs-comment">-- # card table words</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SmallArrayPtrsRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-var">SmallArrayPtrsRep</span></a></span></span><span>
</span><span id="line-164"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>        </span><span class="hs-comment">-- # ptr words</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ArrayWordsRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-var">ArrayWordsRep</span></a></span></span><span>
</span><span id="line-167"></span><span>        </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>        </span><span class="hs-comment">-- # bytes expressed in words, rounded up</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="StackRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StackRep"><span class="hs-identifier hs-var">StackRep</span></a></span></span><span>            </span><span class="hs-comment">-- Stack frame (RET_SMALL or RET_BIG)</span><span>
</span><span id="line-170"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#Liveness"><span class="hs-identifier hs-type">Liveness</span></a></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="RTSRep"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-var">RTSRep</span></a></span></span><span>              </span><span class="hs-comment">-- The RTS needs to declare info tables with specific</span><span>
</span><span id="line-173"></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>             </span><span class="hs-comment">-- type tags, so this form lets us override the default</span><span>
</span><span id="line-174"></span><span>        </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>           </span><span class="hs-comment">-- tag for an SMRep.</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-comment">-- | True \&lt;=&gt; This is a static closure.  Affects how we garbage-collect it.</span><span>
</span><span id="line-177"></span><span class="hs-comment">-- Static closure have an extra static link field at the end.</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- Constructors do not have a static variant; see Note [static constructors]</span><span>
</span><span id="line-179"></span><span class="hs-keyword">type</span><span> </span><span id="IsStatic"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IsStatic"><span class="hs-identifier hs-var">IsStatic</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="hs-comment">-- From an SMRep you can get to the closure type defined in</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- includes/rts/storage/ClosureTypes.h. Described by the function</span><span>
</span><span id="line-183"></span><span class="hs-comment">-- rtsClosureType below.</span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="hs-keyword">data</span><span> </span><span id="ClosureTypeInfo"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-var">ClosureTypeInfo</span></a></span></span><span>
</span><span id="line-186"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Constr"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-var">Constr</span></a></span></span><span>        </span><span class="annot"><a href="GHC.Types.Basic.html#ConTagZ"><span class="hs-identifier hs-type">ConTagZ</span></a></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ConstrDescription"><span class="hs-identifier hs-type">ConstrDescription</span></a></span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Fun"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-var">Fun</span></a></span></span><span>           </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#FunArity"><span class="hs-identifier hs-type">FunArity</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span>
</span><span id="line-188"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Thunk"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ThunkSelector"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-var">ThunkSelector</span></a></span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SelectorOffset"><span class="hs-identifier hs-type">SelectorOffset</span></a></span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BlackHole"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span></span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IndStatic"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span></span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="hs-keyword">type</span><span> </span><span id="ConstrDescription"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ConstrDescription"><span class="hs-identifier hs-var">ConstrDescription</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-comment">-- result of dataConIdentity</span><span>
</span><span id="line-194"></span><span class="hs-keyword">type</span><span> </span><span id="FunArity"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#FunArity"><span class="hs-identifier hs-var">FunArity</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-195"></span><span class="hs-keyword">type</span><span> </span><span id="SelectorOffset"><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SelectorOffset"><span class="hs-identifier hs-var">SelectorOffset</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- Construction</span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkHeapRep"><span class="hs-identifier hs-type">mkHeapRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IsStatic"><span class="hs-identifier hs-type">IsStatic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span>
</span><span id="line-201"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-202"></span><span id="mkHeapRep"><span class="annot"><span class="annottext">mkHeapRep :: DynFlags -&gt; Bool -&gt; ConTagZ -&gt; ConTagZ -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#mkHeapRep"><span class="hs-identifier hs-var hs-var">mkHeapRep</span></a></span></span><span> </span><span id="local-6989586621680934127"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934127"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934126"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934126"><span class="hs-identifier hs-var">is_static</span></a></span></span><span> </span><span id="local-6989586621680934125"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934125"><span class="hs-identifier hs-var">ptr_wds</span></a></span></span><span> </span><span id="local-6989586621680934124"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934124"><span class="hs-identifier hs-var">nonptr_wds</span></a></span></span><span> </span><span id="local-6989586621680934123"><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934123"><span class="hs-identifier hs-var">cl_type_info</span></a></span></span><span>
</span><span id="line-203"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ConTagZ -&gt; ConTagZ -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-var">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934126"><span class="hs-identifier hs-var">is_static</span></a></span><span>
</span><span id="line-204"></span><span>            </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934125"><span class="hs-identifier hs-var">ptr_wds</span></a></span><span>
</span><span id="line-205"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934124"><span class="hs-identifier hs-var">nonptr_wds</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934122"><span class="hs-identifier hs-var">slop_wds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>            </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934123"><span class="hs-identifier hs-var">cl_type_info</span></a></span><span>
</span><span id="line-207"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-208"></span><span>     </span><span id="local-6989586621680934122"><span class="annot"><span class="annottext">slop_wds :: ConTagZ
</span><a href="#local-6989586621680934122"><span class="hs-identifier hs-var hs-var">slop_wds</span></a></span></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934126"><span class="hs-identifier hs-var">is_static</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span>
</span><span id="line-210"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">max</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#minClosureSize"><span class="hs-identifier hs-var">minClosureSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934127"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934113"><span class="hs-identifier hs-var">hdr_size</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934112"><span class="hs-identifier hs-var">payload_size</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span>     </span><span id="local-6989586621680934113"><span class="annot"><span class="annottext">hdr_size :: ConTagZ
</span><a href="#local-6989586621680934113"><span class="hs-identifier hs-var hs-var">hdr_size</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ClosureTypeInfo -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#closureTypeHdrSize"><span class="hs-identifier hs-var">closureTypeHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934127"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934123"><span class="hs-identifier hs-var">cl_type_info</span></a></span><span>
</span><span id="line-213"></span><span>     </span><span id="local-6989586621680934112"><span class="annot"><span class="annottext">payload_size :: ConTagZ
</span><a href="#local-6989586621680934112"><span class="hs-identifier hs-var hs-var">payload_size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934125"><span class="hs-identifier hs-var">ptr_wds</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934124"><span class="hs-identifier hs-var">nonptr_wds</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkRTSRep"><span class="hs-identifier hs-type">mkRTSRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-216"></span><span id="mkRTSRep"><span class="annot"><span class="annottext">mkRTSRep :: ConTagZ -&gt; SMRep -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#mkRTSRep"><span class="hs-identifier hs-var hs-var">mkRTSRep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SMRep -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-var">RTSRep</span></a></span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#mkStackRep"><span class="hs-identifier hs-type">mkStackRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-219"></span><span id="mkStackRep"><span class="annot"><span class="annottext">mkStackRep :: [Bool] -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#mkStackRep"><span class="hs-identifier hs-var hs-var">mkStackRep</span></a></span></span><span> </span><span id="local-6989586621680934109"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680934109"><span class="hs-identifier hs-var">liveness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Bool] -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#StackRep"><span class="hs-identifier hs-var">StackRep</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680934109"><span class="hs-identifier hs-var">liveness</span></a></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#blackHoleRep"><span class="hs-identifier hs-type">blackHoleRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-222"></span><span id="blackHoleRep"><span class="annot"><span class="annottext">blackHoleRep :: SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#blackHoleRep"><span class="hs-identifier hs-var hs-var">blackHoleRep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ConTagZ -&gt; ConTagZ -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-var">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#indStaticRep"><span class="hs-identifier hs-type">indStaticRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-225"></span><span id="indStaticRep"><span class="annot"><span class="annottext">indStaticRep :: SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#indStaticRep"><span class="hs-identifier hs-var hs-var">indStaticRep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ConTagZ -&gt; ConTagZ -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-var">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsRep"><span class="hs-identifier hs-type">arrPtrsRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-228"></span><span id="arrPtrsRep"><span class="annot"><span class="annottext">arrPtrsRep :: DynFlags -&gt; ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#arrPtrsRep"><span class="hs-identifier hs-var hs-var">arrPtrsRep</span></a></span></span><span> </span><span id="local-6989586621680934108"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934108"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934107"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934107"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-var">ArrayPtrsRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934107"><span class="hs-identifier hs-var">elems</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeW"><span class="hs-identifier hs-var">cardTableSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934108"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934107"><span class="hs-identifier hs-var">elems</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsRep"><span class="hs-identifier hs-type">smallArrPtrsRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-231"></span><span id="smallArrPtrsRep"><span class="annot"><span class="annottext">smallArrPtrsRep :: ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsRep"><span class="hs-identifier hs-var hs-var">smallArrPtrsRep</span></a></span></span><span> </span><span id="local-6989586621680934106"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934106"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-var">SmallArrayPtrsRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934106"><span class="hs-identifier hs-var">elems</span></a></span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsRep"><span class="hs-identifier hs-type">arrWordsRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span>
</span><span id="line-234"></span><span id="arrWordsRep"><span class="annot"><span class="annottext">arrWordsRep :: Platform -&gt; ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#arrWordsRep"><span class="hs-identifier hs-var hs-var">arrWordsRep</span></a></span></span><span> </span><span id="local-6989586621680934105"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934105"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934104"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934104"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-var">ArrayWordsRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#bytesToWordsRoundUp"><span class="hs-identifier hs-var">bytesToWordsRoundUp</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934105"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934104"><span class="hs-identifier hs-var">bytes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- Predicates</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-type">isStaticRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#IsStatic"><span class="hs-identifier hs-type">IsStatic</span></a></span><span>
</span><span id="line-240"></span><span id="isStaticRep"><span class="annot"><span class="annottext">isStaticRep :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var hs-var">isStaticRep</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span id="local-6989586621680934103"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934103"><span class="hs-identifier hs-var">is_static</span></a></span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934103"><span class="hs-identifier hs-var">is_static</span></a></span><span>
</span><span id="line-241"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-type">RTSRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934102"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934102"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934102"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier hs-type">isStackRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-245"></span><span id="isStackRep"><span class="annot"><span class="annottext">isStackRep :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier hs-var hs-var">isStackRep</span></a></span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StackRep"><span class="hs-identifier hs-type">StackRep</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-246"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier hs-var">isStackRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-type">RTSRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934101"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934101"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier hs-var">isStackRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934101"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStackRep"><span class="hs-identifier hs-var">isStackRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier hs-type">isConRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-250"></span><span id="isConRep"><span class="annot"><span class="annottext">isConRep :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier hs-var hs-var">isConRep</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-251"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier hs-var">isConRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-type">isThunkRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-254"></span><span id="isThunkRep"><span class="annot"><span class="annottext">isThunkRep :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var hs-var">isThunkRep</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-255"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var">isThunkRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-type">ThunkSelector</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-256"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var">isThunkRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-257"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var">isThunkRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var">isThunkRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isFunRep"><span class="hs-identifier hs-type">isFunRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-261"></span><span id="isFunRep"><span class="annot"><span class="annottext">isFunRep :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isFunRep"><span class="hs-identifier hs-var hs-var">isFunRep</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isFunRep"><span class="hs-identifier hs-var">isFunRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticNoCafCon"><span class="hs-identifier hs-type">isStaticNoCafCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-265"></span><span class="hs-comment">-- This should line up exactly with CONSTR_NOCAF below</span><span>
</span><span id="line-266"></span><span class="hs-comment">-- See Note [Static NoCaf constructors]</span><span>
</span><span id="line-267"></span><span id="isStaticNoCafCon"><span class="annot"><span class="annottext">isStaticNoCafCon :: SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticNoCafCon"><span class="hs-identifier hs-var hs-var">isStaticNoCafCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-268"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#isStaticNoCafCon"><span class="hs-identifier hs-var">isStaticNoCafCon</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-272"></span><span class="hs-comment">-- Size-related things</span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier hs-type">fixedHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-275"></span><span id="fixedHdrSize"><span class="annot"><span class="annottext">fixedHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier hs-var hs-var">fixedHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934100"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934100"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; Platform -&gt; a -&gt; a
</span><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier hs-var">wordsToBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934100"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934100"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="hs-comment">-- | Size of a closure header (StgHeader in includes\/rts\/storage\/Closures.h)</span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-type">fixedHdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-279"></span><span id="fixedHdrSizeW"><span class="annot"><span class="annottext">fixedHdrSizeW :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var hs-var">fixedHdrSizeW</span></a></span></span><span> </span><span id="local-6989586621680934098"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934098"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sTD_HDR_SIZE"><span class="hs-identifier hs-var">sTD_HDR_SIZE</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934098"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#profHdrSize"><span class="hs-identifier hs-var">profHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934098"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- | Size of the profiling part of a closure header</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- (StgProfHeader in includes\/rts\/storage\/Closures.h)</span><span>
</span><span id="line-283"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#profHdrSize"><span class="hs-identifier hs-type">profHdrSize</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-284"></span><span id="profHdrSize"><span class="annot"><span class="annottext">profHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#profHdrSize"><span class="hs-identifier hs-var hs-var">profHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934096"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934096"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-285"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934096"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#pROF_HDR_SIZE"><span class="hs-identifier hs-var">pROF_HDR_SIZE</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934096"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-286"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-comment">-- | The garbage collector requires that every closure is at least as</span><span>
</span><span id="line-289"></span><span class="hs-comment">--   big as this.</span><span>
</span><span id="line-290"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#minClosureSize"><span class="hs-identifier hs-type">minClosureSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-291"></span><span id="minClosureSize"><span class="annot"><span class="annottext">minClosureSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#minClosureSize"><span class="hs-identifier hs-var hs-var">minClosureSize</span></a></span></span><span> </span><span id="local-6989586621680934093"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934093"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934093"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#mIN_PAYLOAD_SIZE"><span class="hs-identifier hs-var">mIN_PAYLOAD_SIZE</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934093"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSize"><span class="hs-identifier hs-type">arrWordsHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-294"></span><span id="arrWordsHdrSize"><span class="annot"><span class="annottext">arrWordsHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSize"><span class="hs-identifier hs-var hs-var">arrWordsHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934091"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934091"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-295"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier hs-var">fixedHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934091"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgArrBytes_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgArrBytes_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934091"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSizeW"><span class="hs-identifier hs-type">arrWordsHdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-298"></span><span id="arrWordsHdrSizeW"><span class="annot"><span class="annottext">arrWordsHdrSizeW :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSizeW"><span class="hs-identifier hs-var hs-var">arrWordsHdrSizeW</span></a></span></span><span> </span><span id="local-6989586621680934089"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934089"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-299"></span><span>    </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934089"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-300"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgArrBytes_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgArrBytes_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934089"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span>
</span><span id="line-301"></span><span>      </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934089"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSize"><span class="hs-identifier hs-type">arrPtrsHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-304"></span><span id="arrPtrsHdrSize"><span class="annot"><span class="annottext">arrPtrsHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSize"><span class="hs-identifier hs-var hs-var">arrPtrsHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934088"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934088"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-305"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier hs-var">fixedHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934088"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgMutArrPtrs_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgMutArrPtrs_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934088"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSizeW"><span class="hs-identifier hs-type">arrPtrsHdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-308"></span><span id="arrPtrsHdrSizeW"><span class="annot"><span class="annottext">arrPtrsHdrSizeW :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSizeW"><span class="hs-identifier hs-var hs-var">arrPtrsHdrSizeW</span></a></span></span><span> </span><span id="local-6989586621680934086"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934086"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-309"></span><span>    </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934086"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-310"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgMutArrPtrs_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgMutArrPtrs_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934086"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span>
</span><span id="line-311"></span><span>      </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934086"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSize"><span class="hs-identifier hs-type">smallArrPtrsHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-314"></span><span id="smallArrPtrsHdrSize"><span class="annot"><span class="annottext">smallArrPtrsHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSize"><span class="hs-identifier hs-var hs-var">smallArrPtrsHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934085"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934085"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-315"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSize"><span class="hs-identifier hs-var">fixedHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934085"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgSmallMutArrPtrs_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgSmallMutArrPtrs_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934085"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSizeW"><span class="hs-identifier hs-type">smallArrPtrsHdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-318"></span><span id="smallArrPtrsHdrSizeW"><span class="annot"><span class="annottext">smallArrPtrsHdrSizeW :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSizeW"><span class="hs-identifier hs-var hs-var">smallArrPtrsHdrSizeW</span></a></span></span><span> </span><span id="local-6989586621680934083"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934083"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-319"></span><span>    </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934083"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-320"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgSmallMutArrPtrs_NoHdr"><span class="hs-identifier hs-var">sIZEOF_StgSmallMutArrPtrs_NoHdr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934083"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span>
</span><span id="line-321"></span><span>      </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934083"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span class="hs-comment">-- Thunks have an extra header word on SMP, so the update doesn't</span><span>
</span><span id="line-324"></span><span class="hs-comment">-- splat the payload.</span><span>
</span><span id="line-325"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-type">thunkHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-326"></span><span id="thunkHdrSize"><span class="annot"><span class="annottext">thunkHdrSize :: DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-var hs-var">thunkHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934082"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934082"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934082"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934081"><span class="hs-identifier hs-var">smp_hdr</span></a></span><span>
</span><span id="line-327"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680934081"><span class="annot"><span class="annottext">smp_hdr :: ConTagZ
</span><a href="#local-6989586621680934081"><span class="hs-identifier hs-var hs-var">smp_hdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#sIZEOF_StgSMPThunkHeader"><span class="hs-identifier hs-var">sIZEOF_StgSMPThunkHeader</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934082"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span>
</span><span id="line-328"></span><span>                         </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934082"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSize"><span class="hs-identifier hs-type">hdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-331"></span><span id="hdrSize"><span class="annot"><span class="annottext">hdrSize :: DynFlags -&gt; SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#hdrSize"><span class="hs-identifier hs-var hs-var">hdrSize</span></a></span></span><span> </span><span id="local-6989586621680934078"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934078"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934077"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934077"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; Platform -&gt; a -&gt; a
</span><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier hs-var">wordsToBytes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934078"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var">hdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934078"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934077"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-type">hdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-334"></span><span id="hdrSizeW"><span class="annot"><span class="annottext">hdrSizeW :: DynFlags -&gt; SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var hs-var">hdrSizeW</span></a></span></span><span> </span><span id="local-6989586621680934076"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934076"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934075"><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934075"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ClosureTypeInfo -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#closureTypeHdrSize"><span class="hs-identifier hs-var">closureTypeHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934076"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934075"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-335"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var">hdrSizeW</span></a></span><span> </span><span id="local-6989586621680934074"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934074"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-type">ArrayPtrsRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSizeW"><span class="hs-identifier hs-var">arrPtrsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934074"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-336"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var">hdrSizeW</span></a></span><span> </span><span id="local-6989586621680934073"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934073"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-type">SmallArrayPtrsRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSizeW"><span class="hs-identifier hs-var">smallArrPtrsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934073"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-337"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var">hdrSizeW</span></a></span><span> </span><span id="local-6989586621680934072"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934072"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-type">ArrayWordsRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSizeW"><span class="hs-identifier hs-var">arrWordsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934072"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-338"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#hdrSizeW"><span class="hs-identifier hs-var">hdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConTagZ
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SMRep.hdrSizeW&quot;</span></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSize"><span class="hs-identifier hs-type">nonHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-341"></span><span id="nonHdrSize"><span class="annot"><span class="annottext">nonHdrSize :: Platform -&gt; SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#nonHdrSize"><span class="hs-identifier hs-var hs-var">nonHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934070"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934070"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680934069"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934069"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; Platform -&gt; a -&gt; a
</span><a href="GHC.Runtime.Heap.Layout.html#wordsToBytes"><span class="hs-identifier hs-var">wordsToBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680934070"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934069"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-type">nonHdrSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-344"></span><span id="nonHdrSizeW"><span class="annot"><span class="annottext">nonHdrSizeW :: SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var hs-var">nonHdrSizeW</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934068"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934068"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680934067"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934067"><span class="hs-identifier hs-var">np</span></a></span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934068"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934067"><span class="hs-identifier hs-var">np</span></a></span><span>
</span><span id="line-345"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-type">ArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680934066"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934066"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span id="local-6989586621680934065"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934065"><span class="hs-identifier hs-var">ct</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934066"><span class="hs-identifier hs-var">elems</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934065"><span class="hs-identifier hs-var">ct</span></a></span><span>
</span><span id="line-346"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-type">SmallArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680934064"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934064"><span class="hs-identifier hs-var">elems</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934064"><span class="hs-identifier hs-var">elems</span></a></span><span>
</span><span id="line-347"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-type">ArrayWordsRep</span></a></span><span> </span><span id="local-6989586621680934063"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934063"><span class="hs-identifier hs-var">words</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934063"><span class="hs-identifier hs-var">words</span></a></span><span>
</span><span id="line-348"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StackRep"><span class="hs-identifier hs-type">StackRep</span></a></span><span> </span><span id="local-6989586621680934062"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680934062"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Bool] -&gt; ConTagZ
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; ConTagZ
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680934062"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-type">RTSRep</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934060"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934060"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#nonHdrSizeW"><span class="hs-identifier hs-var">nonHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934060"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span class="hs-comment">-- | The total size of the closure, in words.</span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-type">heapClosureSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-353"></span><span id="heapClosureSizeW"><span class="annot"><span class="annottext">heapClosureSizeW :: DynFlags -&gt; SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var hs-var">heapClosureSizeW</span></a></span></span><span> </span><span id="local-6989586621680934059"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934059"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680934058"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934058"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680934057"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934057"><span class="hs-identifier hs-var">np</span></a></span></span><span> </span><span id="local-6989586621680934056"><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934056"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-354"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ClosureTypeInfo -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#closureTypeHdrSize"><span class="hs-identifier hs-var">closureTypeHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934059"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934056"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934058"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934057"><span class="hs-identifier hs-var">np</span></a></span><span>
</span><span id="line-355"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var">heapClosureSizeW</span></a></span><span> </span><span id="local-6989586621680934055"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934055"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-type">ArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680934054"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934054"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span id="local-6989586621680934053"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934053"><span class="hs-identifier hs-var">ct</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-356"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrPtrsHdrSizeW"><span class="hs-identifier hs-var">arrPtrsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934055"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934054"><span class="hs-identifier hs-var">elems</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934053"><span class="hs-identifier hs-var">ct</span></a></span><span>
</span><span id="line-357"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var">heapClosureSizeW</span></a></span><span> </span><span id="local-6989586621680934052"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934052"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-type">SmallArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680934051"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934051"><span class="hs-identifier hs-var">elems</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#smallArrPtrsHdrSizeW"><span class="hs-identifier hs-var">smallArrPtrsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934052"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934051"><span class="hs-identifier hs-var">elems</span></a></span><span>
</span><span id="line-359"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var">heapClosureSizeW</span></a></span><span> </span><span id="local-6989586621680934050"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934050"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-type">ArrayWordsRep</span></a></span><span> </span><span id="local-6989586621680934049"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934049"><span class="hs-identifier hs-var">words</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-360"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#arrWordsHdrSizeW"><span class="hs-identifier hs-var">arrWordsHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934050"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934049"><span class="hs-identifier hs-var">words</span></a></span><span>
</span><span id="line-361"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var">heapClosureSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConTagZ
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SMRep.heapClosureSize&quot;</span></span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#closureTypeHdrSize"><span class="hs-identifier hs-type">closureTypeHdrSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-364"></span><span id="closureTypeHdrSize"><span class="annot"><span class="annottext">closureTypeHdrSize :: DynFlags -&gt; ClosureTypeInfo -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#closureTypeHdrSize"><span class="hs-identifier hs-var hs-var">closureTypeHdrSize</span></a></span></span><span> </span><span id="local-6989586621680934048"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934047"><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934047"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934047"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-365"></span><span>                  </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-var">thunkHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-366"></span><span>                  </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-type">ThunkSelector</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-var">thunkHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-367"></span><span>                  </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-var">thunkHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-368"></span><span>                  </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#thunkHdrSize"><span class="hs-identifier hs-var">thunkHdrSize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-369"></span><span>                  </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#fixedHdrSizeW"><span class="hs-identifier hs-var">fixedHdrSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934048"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-370"></span><span>        </span><span class="hs-comment">-- All thunks use thunkHdrSize, even if they are non-updatable.</span><span>
</span><span id="line-371"></span><span>        </span><span class="hs-comment">-- this is because we don't have separate closure types for</span><span>
</span><span id="line-372"></span><span>        </span><span class="hs-comment">-- updatable vs. non-updatable thunks, so the GC can't tell the</span><span>
</span><span id="line-373"></span><span>        </span><span class="hs-comment">-- difference.  If we ever have significant numbers of non-</span><span>
</span><span id="line-374"></span><span>        </span><span class="hs-comment">-- updatable thunks, it might be worth fixing this.</span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-377"></span><span class="hs-comment">-- Arrays</span><span>
</span><span id="line-378"></span><span>
</span><span id="line-379"></span><span class="hs-comment">-- | The byte offset into the card table of the card for a given element</span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#card"><span class="hs-identifier hs-type">card</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-381"></span><span id="card"><span class="annot"><span class="annottext">card :: DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#card"><span class="hs-identifier hs-var hs-var">card</span></a></span></span><span> </span><span id="local-6989586621680934046"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934046"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934045"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934045"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934045"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Bits a =&gt; a -&gt; ConTagZ -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#mUT_ARR_PTRS_CARD_BITS"><span class="hs-identifier hs-var">mUT_ARR_PTRS_CARD_BITS</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934046"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-382"></span><span>
</span><span id="line-383"></span><span class="hs-comment">-- | Convert a number of elements to a number of cards, rounding up</span><span>
</span><span id="line-384"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardRoundUp"><span class="hs-identifier hs-type">cardRoundUp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-385"></span><span id="cardRoundUp"><span class="annot"><span class="annottext">cardRoundUp :: DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardRoundUp"><span class="hs-identifier hs-var hs-var">cardRoundUp</span></a></span></span><span> </span><span id="local-6989586621680934042"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934042"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934041"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934041"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-386"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#card"><span class="hs-identifier hs-var">card</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934042"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934041"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Bits a =&gt; a -&gt; ConTagZ -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ
</span><a href="GHC.Driver.Session.html#mUT_ARR_PTRS_CARD_BITS"><span class="hs-identifier hs-var">mUT_ARR_PTRS_CARD_BITS</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934042"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; ConTagZ -&gt; ConTagZ
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">-- | The size of a card table, in bytes</span><span>
</span><span id="line-389"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeB"><span class="hs-identifier hs-type">cardTableSizeB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span>
</span><span id="line-390"></span><span id="cardTableSizeB"><span class="annot"><span class="annottext">cardTableSizeB :: DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeB"><span class="hs-identifier hs-var hs-var">cardTableSizeB</span></a></span></span><span> </span><span id="local-6989586621680934039"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934039"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934038"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934038"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardRoundUp"><span class="hs-identifier hs-var">cardRoundUp</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934039"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934038"><span class="hs-identifier hs-var">elems</span></a></span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span class="hs-comment">-- | The size of a card table, in words</span><span>
</span><span id="line-393"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeW"><span class="hs-identifier hs-type">cardTableSizeW</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span>
</span><span id="line-394"></span><span id="cardTableSizeW"><span class="annot"><span class="annottext">cardTableSizeW :: DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeW"><span class="hs-identifier hs-var hs-var">cardTableSizeW</span></a></span></span><span> </span><span id="local-6989586621680934037"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934037"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680934036"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934036"><span class="hs-identifier hs-var">elems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-395"></span><span>  </span><span class="annot"><span class="annottext">Platform -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#bytesToWordsRoundUp"><span class="hs-identifier hs-var">bytesToWordsRoundUp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934037"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ConTagZ -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#cardTableSizeB"><span class="hs-identifier hs-var">cardTableSizeB</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680934037"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934036"><span class="hs-identifier hs-var">elems</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-399"></span><span class="hs-comment">-- deriving the RTS closure type from an SMRep</span><span class="hs-cpp">

#include &quot;../includes/rts/storage/ClosureTypes.h&quot;
</span><span class="hs-cpp">#include &quot;../includes/rts/storage/FunTypes.h&quot;
</span><span class="hs-comment">-- Defines CONSTR, CONSTR_1_0 etc</span><span>
</span><span id="line-404"></span><span>
</span><span id="line-405"></span><span class="hs-comment">-- | Derives the RTS closure type from an 'SMRep'</span><span>
</span><span id="line-406"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rtsClosureType"><span class="hs-identifier hs-type">rtsClosureType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-407"></span><span id="rtsClosureType"><span class="annot"><span class="annottext">rtsClosureType :: SMRep -&gt; ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#rtsClosureType"><span class="hs-identifier hs-var hs-var">rtsClosureType</span></a></span></span><span> </span><span id="local-6989586621680934035"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934035"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-408"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680934035"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-409"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-type">RTSRep</span></a></span><span> </span><span id="local-6989586621680934034"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934034"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934034"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span>      </span><span class="hs-comment">-- See Note [static constructors]</span><span>
</span><span id="line-412"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_1_0</span><span>
</span><span id="line-413"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_0_1</span><span>
</span><span id="line-414"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_2_0</span><span>
</span><span id="line-415"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_1_1</span><span>
</span><span id="line-416"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_0_2</span><span>
</span><span id="line-417"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR_NOCAF</span><span>
</span><span id="line-418"></span><span>           </span><span class="hs-comment">-- See Note [Static NoCaf constructors]</span><span>
</span><span id="line-419"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">CONSTR</span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_1_0</span><span>
</span><span id="line-422"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_0_1</span><span>
</span><span id="line-423"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_2_0</span><span>
</span><span id="line-424"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_1_1</span><span>
</span><span id="line-425"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_0_2</span><span>
</span><span id="line-426"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN</span><span>
</span><span id="line-427"></span><span>
</span><span id="line-428"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_1_0</span><span>
</span><span id="line-429"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_0_1</span><span>
</span><span id="line-430"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_2_0</span><span>
</span><span id="line-431"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_1_1</span><span>
</span><span id="line-432"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_0_2</span><span>
</span><span id="line-433"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK</span><span>
</span><span id="line-434"></span><span>
</span><span id="line-435"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-type">ThunkSelector</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-identifier">THUNK_SELECTOR</span><span>
</span><span id="line-436"></span><span>
</span><span id="line-437"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">FUN_STATIC</span><span>
</span><span id="line-438"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">THUNK_STATIC</span><span>
</span><span id="line-439"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">BLACKHOLE</span><span>
</span><span id="line-440"></span><span>      </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IND_STATIC</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span>      </span><span class="annot"><span class="annottext">SMRep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConTagZ
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rtsClosureType&quot;</span></span><span>
</span><span id="line-443"></span><span>
</span><span id="line-444"></span><span class="hs-comment">-- We export these ones</span><span>
</span><span id="line-445"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rET_SMALL"><span class="hs-identifier hs-type">rET_SMALL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#rET_BIG"><span class="hs-identifier hs-type">rET_BIG</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN"><span class="hs-identifier hs-type">aRG_GEN</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN_BIG"><span class="hs-identifier hs-type">aRG_GEN_BIG</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-446"></span><span id="rET_SMALL"><span class="annot"><span class="annottext">rET_SMALL :: ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#rET_SMALL"><span class="hs-identifier hs-var hs-var">rET_SMALL</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">RET_SMALL</span><span>
</span><span id="line-447"></span><span id="rET_BIG"><span class="annot"><span class="annottext">rET_BIG :: ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#rET_BIG"><span class="hs-identifier hs-var hs-var">rET_BIG</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">RET_BIG</span><span>
</span><span id="line-448"></span><span id="aRG_GEN"><span class="annot"><span class="annottext">aRG_GEN :: ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN"><span class="hs-identifier hs-var hs-var">aRG_GEN</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ARG_GEN</span><span>
</span><span id="line-449"></span><span id="aRG_GEN_BIG"><span class="annot"><span class="annottext">aRG_GEN_BIG :: ConTagZ
</span><a href="GHC.Runtime.Heap.Layout.html#aRG_GEN_BIG"><span class="hs-identifier hs-var hs-var">aRG_GEN_BIG</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ARG_GEN_BIG</span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="hs-comment">{-
Note [static constructors]
~~~~~~~~~~~~~~~~~~~~~~~~~~

We used to have a CONSTR_STATIC closure type, and each constructor had
two info tables: one with CONSTR (or CONSTR_1_0 etc.), and one with
CONSTR_STATIC.

This distinction was removed, because when copying a data structure
into a compact region, we must copy static constructors into the
compact region too.  If we didn't do this, we would need to track the
references from the compact region out to the static constructors,
because they might (indirectly) refer to CAFs.

Since static constructors will be copied to the heap, if we wanted to
use different info tables for static and dynamic constructors, we
would have to switch the info pointer when copying the constructor
into the compact region, which means we would need an extra field of
the static info table to point to the dynamic one.

However, since the distinction between static and dynamic closure
types is never actually needed (other than for assertions), we can
just drop the distinction and use the same info table for both.

The GC *does* need to distinguish between static and dynamic closures,
but it does this using the HEAP_ALLOCED() macro which checks whether
the address of the closure resides within the dynamic heap.
HEAP_ALLOCED() doesn't read the closure's info table.

Note [Static NoCaf constructors]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we know that a top-level binding 'x' is not Caffy (ie no CAFs are
reachable from 'x'), then a statically allocated constructor (Just x)
is also not Caffy, and the garbage collector need not follow its
argument fields.  Exploiting this would require two static info tables
for Just, for the two cases where the argument was Caffy or non-Caffy.

Currently we don't do this; instead we treat nullary constructors
as non-Caffy, and the others as potentially Caffy.


************************************************************************
*                                                                      *
             Pretty printing of SMRep and friends
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-498"></span><span>
</span><span id="line-499"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934031"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-500"></span><span>   </span><span id="local-6989586621680934030"><span class="annot"><span class="annottext">ppr :: ClosureTypeInfo -&gt; SDoc
</span><a href="#local-6989586621680934030"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo -&gt; SDoc
</span><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span>
</span><span id="line-501"></span><span>
</span><span id="line-502"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680934026"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-503"></span><span>   </span><span id="local-6989586621680934013"><span class="annot"><span class="annottext">ppr :: SMRep -&gt; SDoc
</span><a href="#local-6989586621680934013"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#HeapRep"><span class="hs-identifier hs-type">HeapRep</span></a></span><span> </span><span id="local-6989586621680934012"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934012"><span class="hs-identifier hs-var">static</span></a></span></span><span> </span><span id="local-6989586621680934011"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934011"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621680934010"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934010"><span class="hs-identifier hs-var">nps</span></a></span></span><span> </span><span id="local-6989586621680934009"><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934009"><span class="hs-identifier hs-var">tyinfo</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-504"></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; ConTagZ -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680934007"><span class="hs-identifier hs-var">header</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#lbrace"><span class="hs-identifier hs-var">lbrace</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ClosureTypeInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621680934009"><span class="hs-identifier hs-var">tyinfo</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#rbrace"><span class="hs-identifier hs-var">rbrace</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span>     </span><span class="hs-keyword">where</span><span>
</span><span id="line-506"></span><span>       </span><span id="local-6989586621680934007"><span class="annot"><span class="annottext">header :: SDoc
</span><a href="#local-6989586621680934007"><span class="hs-identifier hs-var hs-var">header</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HeapRep&quot;</span></span><span>
</span><span id="line-507"></span><span>                </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680934012"><span class="hs-identifier hs-var">static</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;static&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-508"></span><span>                </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ConTagZ -&gt; SDoc
</span><a href="#local-6989586621680934001"><span class="hs-identifier hs-var">pp_n</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ptrs&quot;</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934011"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ConTagZ -&gt; SDoc
</span><a href="#local-6989586621680934001"><span class="hs-identifier hs-var">pp_n</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nonptrs&quot;</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680934010"><span class="hs-identifier hs-var">nps</span></a></span><span>
</span><span id="line-509"></span><span>       </span><span class="annot"><a href="#local-6989586621680934001"><span class="hs-identifier hs-type">pp_n</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-510"></span><span>       </span><span id="local-6989586621680934001"><span class="annot"><span class="annottext">pp_n :: String -&gt; ConTagZ -&gt; SDoc
</span><a href="#local-6989586621680934001"><span class="hs-identifier hs-var hs-var">pp_n</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-511"></span><span>       </span><span class="annot"><a href="#local-6989586621680934001"><span class="hs-identifier hs-var">pp_n</span></a></span><span> </span><span id="local-6989586621680934000"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680934000"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680933999"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933999"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933999"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680934000"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-512"></span><span>
</span><span id="line-513"></span><span>   </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayPtrsRep"><span class="hs-identifier hs-type">ArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680933997"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933997"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ArrayPtrsRep&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933997"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-514"></span><span>
</span><span id="line-515"></span><span>   </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SmallArrayPtrsRep"><span class="hs-identifier hs-type">SmallArrayPtrsRep</span></a></span><span> </span><span id="local-6989586621680933996"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933996"><span class="hs-identifier hs-var">size</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SmallArrayPtrsRep&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933996"><span class="hs-identifier hs-var">size</span></a></span><span>
</span><span id="line-516"></span><span>
</span><span id="line-517"></span><span>   </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ArrayWordsRep"><span class="hs-identifier hs-type">ArrayWordsRep</span></a></span><span> </span><span id="local-6989586621680933995"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933995"><span class="hs-identifier hs-var">words</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ArrayWordsRep&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933995"><span class="hs-identifier hs-var">words</span></a></span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span>   </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#StackRep"><span class="hs-identifier hs-type">StackRep</span></a></span><span> </span><span id="local-6989586621680933994"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680933994"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;StackRep&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680933994"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span>   </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#RTSRep"><span class="hs-identifier hs-type">RTSRep</span></a></span><span> </span><span id="local-6989586621680933993"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933993"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680933992"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680933992"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;tag:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933993"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621680933992"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-522"></span><span>
</span><span id="line-523"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-type">pprTypeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-524"></span><span id="pprTypeInfo"><span class="annot"><span class="annottext">pprTypeInfo :: ClosureTypeInfo -&gt; SDoc
</span><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var hs-var">pprTypeInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-type">Constr</span></a></span><span> </span><span id="local-6989586621680933990"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933990"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span id="local-6989586621680933989"><span class="annot"><span class="annottext">ConstrDescription
</span><a href="#local-6989586621680933989"><span class="hs-identifier hs-var">descr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-525"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Con&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-526"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;tag:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933990"><span class="hs-identifier hs-var">tag</span></a></span><span>
</span><span id="line-527"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;descr:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConstrDescription -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">ConstrDescription
</span><a href="#local-6989586621680933989"><span class="hs-identifier hs-var">descr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>
</span><span id="line-529"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-type">Fun</span></a></span><span> </span><span id="local-6989586621680933985"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933985"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span id="local-6989586621680933984"><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621680933984"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Fun&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-531"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;arity:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933985"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-532"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fun_type:&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDescr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621680933984"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span>
</span><span id="line-534"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-type">ThunkSelector</span></a></span><span> </span><span id="local-6989586621680933981"><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933981"><span class="hs-identifier hs-var">offset</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-535"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ThunkSel&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ConTagZ
</span><a href="#local-6989586621680933981"><span class="hs-identifier hs-var">offset</span></a></span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Thunk&quot;</span></span><span>
</span><span id="line-538"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#BlackHole"><span class="hs-identifier hs-var">BlackHole</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;BlackHole&quot;</span></span><span>
</span><span id="line-539"></span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#pprTypeInfo"><span class="hs-identifier hs-var">pprTypeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#IndStatic"><span class="hs-identifier hs-var">IndStatic</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;IndStatic&quot;</span></span><span>
</span><span id="line-540"></span></pre></body></html>